module.exports = function a(ctx) {
  return {
    supportTS: false,
    supportIE: false,
    boot: [
      'index',
      'filter',
      'msg',
      'api',
    ],
    css: [
      'app.styl',
    ],
    extras: [
      'roboto-font',
      'material-icons',
      'mdi-v6',
    ],
    framework: {
      iconSet: 'material-icons',
      lang: 'zh-hans',
      importStrategy: 'all',
      plugins: [
        'Notify',
        'Dialog',
        'AppFullscreen',
        'Loading',
      ],
      config: {
        notify: {
          position: 'top',
          timeout: 4000,
          color: 'info',
          icon: 'info',
          actions: [{ icon: 'close', color: 'white' }],
        },
        loading: {
          message: '加载中...', messageColor: 'white', spinnerSize: '50px', spinnerColor: 'cyan', spinner: 'q-spinner-gears',
        },
      },
    },
    animations: 'all',
    build: {
      // vueRouterMode: 'history',
      vueCompiler: true, // 仅 Vue运行时       devtool: 'none',
      transpile: true, // 执行babel转码
      scopeHoisting: true, // 提升运行时性能
      analyze: false, // 显示分析
      modern: true, // ES6
      extractCSS: false, // 从Vue文件中提取CSS
      minify: false, // 缩小代码
      preloadChunks: false, // 预加载       sourceMap: false,
      gzip: false,
      extendWebpack() {
      },
      env: {
        PRODUCT_NAME: '考研系统',
        BASE_URL: '/weather-api',
        SERVER_URL: 'http://127.0.0.1:9008',
        WMTS_URL: 'https://t0.tianditu.gov.cn/vec_c/wmts?request=GetCapabilities&service=wmts&tk=5c93d93a55bd6de9ffd2953cae347505',
        WMTS_IMG_URL: 'https://t0.tianditu.gov.cn/img_c/wmts?request=GetCapabilities&service=wmts&tk=5c93d93a55bd6de9ffd2953cae347505',
        WMTS_CAV_URL: 'https://t0.tianditu.gov.cn/cva_c/wmts?request=GetCapabilities&service=wmts&tk=5c93d93a55bd6de9ffd2953cae347505',
        WMTS_TK: '&tk=5c93d93a55bd6de9ffd2953cae347505',
        INPUT_PASSWORD: true,
        MAX_FILE_SIZE: 50 * 1024 * 1024,
        ANITIME: 400,
        NEXTIME: 9999,
        QRCODE: 'multi',
      },
    },
    devServer: {
      https: false,
      port: 9006,
      open: true,
      proxy: {
        '/weather-api': {
          target: 'http://localhost:9008',
          changeOrigin: true,
        },
      },
    },
  };
};
